package com.fanrui.code.main;

import java.util.Map;

public class HttpRequerst implements IHttpRequerst{
	private Map<String,String> parameters = null;
	private String method = null;
	
	@Override 
	public String getMethond() {
		if(method == null){
			return "";
		}else{
			return method;
		}
	}

	@Override
	public String getParamter(String name) {
		if(parameters == null || !parameters.containsKey(name)){
			return "";
		}
		return parameters.get(name);
	}

	public void setParameters(Map<String, String> parameters) {
		this.parameters = parameters;
	}

	public void setMethod(String method) {
		this.method = method;
	}
	
	@Override
	public String toString() {
		return super.toString()+"  method:"+method+"parameters:"+parameters.toString();
	}

}
